const {resolve} =require('path')
const HtmlWebpackPlugin = require('html-webpack-plugin')
module.exports ={
    entry:'./src/index.js',
    output:{
        filename:'js/built.js',
        path:resolve(__dirname,'dist')
    },
    module:{
        rules:[{
            test: /\.js$/ ,
            exclude:/node_modules/,
            loader:'babel-loader',
            options:{
                presets:['@babel/preset-env']
            }
        }]
    },
    plugins:[
        new HtmlWebpackPlugin({
            template:'./src/index.html'
        })
    ],
    mode:'development',
}